---
title: "pk82033_thirdparty stored procedure documentation"
summary: "Retrieved Oracle package; this library uses its waiver-count helper to count third-party waiver rows for a policy."
status: draft
owner: "SAIF Claims BOF team"
last_reviewed: "2026-08-25"
source_schema: "WCIS_DBA"
source_name: "pk82033_thirdparty"
source_type: "PACKAGE"
retrieval_status: "found"
retrieval_command: "legends oracle query --name pk82033_thirdparty"
retrieval_date: "2026-08-25"
---
# pk82033_thirdparty

## Overview

| Field | Value |
| --- | --- |
| **Schema** | `WCIS_DBA` |
| **Type** | Package |
| **Database** | Oracle |
| **Calling libraries** | `SAIF.Business.View.Policy` |
| **Calling classes** | `clsPolicyData` |

## Purpose

`pk82033_thirdparty` is a broad third-party maintenance package. Within this library, the retrieved source is used only for `get_policy_waiver_count`, which counts waiver-detail rows for one policy.

## Procedures / Methods

### get_policy_waiver_count

| Field | Value |
| --- | --- |
| **Returns** | `NUMBER` |
| **Called by** | `clsPolicyData` ad hoc waiver-count retrieval |
| **Description** | Returns the number of `WAIVER_DETAIL` rows for the supplied policy number. |

#### Parameters

| Parameter | Direction | Type | Default | Description |
| --- | --- | --- | --- | --- |
| `PolicyNum` | IN | `POLICY.POLICY_NUM%TYPE` | — | Policy number whose waiver rows should be counted. |

## Business Rules

The retrieved database source embeds the following server-side rules.

| Rule ID | Summary |
| --- | --- |
| [BR-VP-028](#br-vp-028-policy-waiver-count-equals-the-number-of-waiver-detail-rows-for-the-policy) | `get_policy_waiver_count` returns `COUNT(*)` from `WAIVER_DETAIL` for the supplied policy number. |

### BR-VP-028 Policy waiver count equals the number of waiver-detail rows for the policy

| Field | Value |
| --- | --- |
| **Statement** | The waiver-count helper returns the number of `WAIVER_DETAIL` rows whose `POLICY_NUM` equals the input policy number. |
| **Trigger** | `get_policy_waiver_count` executes. |
| **Enforcement** | The function runs `SELECT COUNT(*) INTO v_count FROM WAIVER_DETAIL WHERE POLICY_NUM = PolicyNum` and returns `v_count`. |
| **Outcome** | Callers receive a simple numeric waiver count for the policy. |
| **Source** | Oracle retrieval JSON: `C:\Users\chrfre\AppData\Local\Temp\oracle-sources\pk82033_thirdparty.json` |

## Operations

The retrieved database source implements the following internal operations.

| Operation | Description | Trigger |
| --- | --- | --- |
| [Count policy waiver rows](#count-policy-waiver-rows) | Return the number of `WAIVER_DETAIL` rows for the supplied policy number. | Caller invokes `get_policy_waiver_count`. |

### Count policy waiver rows

| Field | Value |
| --- | --- |
| **Description** | Return the number of `WAIVER_DETAIL` rows for the supplied policy number. |
| **Trigger** | Caller invokes `get_policy_waiver_count`. |
| **Source** | Oracle retrieval JSON: `C:\Users\chrfre\AppData\Local\Temp\oracle-sources\pk82033_thirdparty.json` |

## Calling code references

| Class | Method | Source File |
| --- | --- | --- |
| `clsPolicyData` | `ad hoc method (`get_policy_waiver_count`)` | `SAIF.Business.View.Policy\clsPolicyData.vb` |

## Source Code

<details>
<summary>Representative package specification excerpt</summary>

```sql
) RETURN NUMBER;


FUNCTION get_policy_waiver_count
(
	PolicyNum IN POLICY.POLICY_NUM%TYPE
)
RETURN NUMBER;
```

</details>

<details>
<summary>Representative package body excerpt for waiver-count helper</summary>

```sql
** FUNCTION TO RETRIEVE POLICY WAIVER COUNT
** DATE: 26-JULY-06 07:27:00
*********************************************/
FUNCTION get_policy_waiver_count
(
	PolicyNum IN POLICY.POLICY_NUM%TYPE
)
RETURN NUMBER
AS
v_count NUMBER := 0;
BEGIN
	 SELECT COUNT(*)
	   INTO v_count
 	   FROM WAIVER_DETAIL
   	  WHERE POLICY_NUM = PolicyNum;

	RETURN v_count;
END get_policy_waiver_count;
```

</details>

## Related documentation
- [Procedure catalog](index.md)
- [Business rules](../business-rules.md)
- [Operations and processes](../operations-processes.md)
- [SQL catalog](../sql/index.md)

## Sources
- Oracle retrieval JSON: `C:\Users\chrfre\AppData\Local\Temp\oracle-sources\pk82033_thirdparty.json`
- Calling code: `SAIF.Business.View.Policy\clsPolicyData.vb`
